import { IsOptional, IsNotEmpty, Length } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class UpdateRestaurantDto {
  @ApiProperty({ description: '餐厅名称', required: false, maxLength: 50 })
  @IsOptional()
  @Length(1, 50, { message: '餐厅名称长度不能超过50' })
  name?: string;

  @ApiProperty({ description: '餐厅地址', required: false, maxLength: 255 })
  @IsOptional()
  @Length(1, 255, { message: '餐厅地址长度不能超过255' })
  address?: string;

  @ApiProperty({ description: '餐厅经度', required: false })
  @IsOptional()
  longitude?: number;

  @ApiProperty({ description: '餐厅纬度', required: false })
  @IsOptional()
  latitude?: number;

  @ApiProperty({ description: '餐厅图片', required: false })
  @IsOptional()
  image?: string;

  @ApiProperty({ description: '餐厅公告', required: false })
  @IsOptional()
  notice?: string;

  @ApiProperty({ description: '联系电话', required: false })
  @IsOptional()
  phone?: string;

  @ApiProperty({ description: '起送价', required: false })
  @IsOptional()
  minPrice?: number;

  @ApiProperty({ description: '配送费', required: false })
  @IsOptional()
  deliveryFee?: number;
}
